home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Alles Voor Internet / Tout Pour Internet
/
alles voor internet.iso
/
MacInternet™
/
Telnet
/
NCSA
/
tn3270 2.4d7 source
/
tn3270
/
termdef.h
< prev
next >
Wrap
Text File
|
1992-04-17
|
29KB
|
784 lines
/*
* tn3270 for the Macintosh Source Code
* Brown University Computing and Information Services
* Version 2.4d7 April, 1992
* Copyright (c) 1988, 1989, 1990, 1991, 1992 by Brown University and by
* Peter John DiCamillo.
*
* Permission is granted to any individual or institution to use, copy,
* or redistribute the binary version of this software and its
* documentation provided this notice and the copyright notices are
* retained. Permission is granted to any individual or non-profit
* institution to use, copy, modify, or redistribute the source files
* of this software provided this notice and the copyright notices are
* retained. This software may not be distributed for profit, either
* in original form or in derivative works, nor can the source be
* distributed to other than an individual or a non-profit institution.
* Any individual or group interested in seeing and/or using these
* source files but who are prevented from doing so by the above
* constraints should contact Don Wolfe, Assistant Vice-President for
* Computer Systems at Brown University, (401) 863-7250, for possible
* software licensing of the source developed at Brown.
*
* Brown University and Peter John DiCamillo make no representations
* about the suitability of this software for any purpose.
*
* BROWN UNIVERSITY AND PETER JOHN DICAMILLO GIVE NO WARRANTY, EITHER
* EXPRESS OR IMPLIED, FOR THE PROGRAM AND/OR DOCUMENTATION PROVIDED,
* INCLUDING, WITHOUT LIMITATION, WARRANTY OF MERCHANTABILITY AND
* WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#define NUL 0x00
#define CD 0x01
#define GRFBGN 0x04
#define XFBGN 0x06
#define BEL 0x07
#define BS 0x08
#define TAB 0x09
#define LF 0x0a
#define VT 0x0b
#define FF 0x0c
#define CR 0x0d
#define SO 0x0e
#define DC1 0x11
#define DC3 0x13
#define DC4 0x14
#define CPMEOF 0x1a
#define ESC 0x1b
#define DEL 0x7f
/* equates for VM CP DIAG X'7C' ldev creation */
#define WSFFLAG 0x80 /* flag for Write Structured Field support */
#define MDL32782 0x02 /* 3278 model 2 (24 by 80) */
#define MDL32783 0x03 /* 3278 model 3 (32 by 80) */
#define MDL32784 0x04 /* 3278 model 4 (43 by 80) */
#define MDL32785 0x05 /* 3278 model 5 (27 by 132) */
#define MDL32792 0x92 /* 3279 model 2 (24 by 80) */
#define MDL32793 0x93 /* 3279 model 3 (32 by 80) */
#define CLASGRAF 0x40
#define TYP3278 0x01
#define NMENUS 7
#define portalrt 256 /* stoperr message codes */
#define loadalrt 257
#define srvalrt 258
#define atpalrt 259
#define rmtalrt 260
#define nackalrt 261
#define ioalrt 262
#define rsetalrt 263
#define ssetalrt 264
#define wsetalrt 265
#define addralrt 266
#define regalrt 267
#define cfigalrt 268
#define domalrt 269
#define topnalrt 270
#define conalrt 271
#define rspalrt 272
#define numalrt 273
#define negalrt 274
#define wrtalrt 275
#define et1alrt 276
#define et2alrt 277
#define et3alrt 278
#define mapalrt 279
#define wpictalrt 280
#define kbdefalrt 281
#define kbsetalrt 282
#define nlsetalrt 283
#define fmtalrt 284
#define hostfalrt 285
#define sdsetalrt 286
#define sdmemalrt 287
#define newwindalrt 288
#define windfmtalrt 289
#define apinalrt 290
#define apisalrt 291
#define pnumalrt 292
#define ppcinitalrt 293
#define ppcnamealrt 294
#define ppcopenalrt 295
#define nodrvalrt 296
#define sesslimalrt 297
#define newsesalrt 298
/* definitions for built-in fonts */
#define SYMBOLFONT 239
#define NORMALFONT 240
#define APLFONT 241
#define BOLDNORMAL 242
#define BOLDAPL 243
#define ALAFONT 244
#define BOLDALA 246
typedef struct { /* element of keyboard input queue */
unsigned char code;
unsigned char shift;
} kbdata;
#define KBQMAX 200 /* size of keyboard input queue */
#define WRITEINFOCOUNT 4 /* how many previous writes to save stats on */
#define INFODATASIZE 8 /* bytes of data to save */
typedef struct {
unsigned long seqnum; /* sequence number */
unsigned long start_ticks; /* tick count at call */
unsigned long end_ticks; /* tick count after completion */
unsigned short length; /* number of bytes */
unsigned short calls; /* number of calls to netwrite */
short result; /* final result code */
unsigned char data[INFODATASIZE]; /* start of data */
} writeinfo;
#define MAXSESSIONS 8 /* maximum number of sessions allowed */
typedef struct {
unsigned char * name;
unsigned char type; /* type values: */
/* a = string of arbitrary length (size = 1)
b = binary flag (size = 1)
c = unsigned char (size = 1), decimal
i = (signed) short int (size = 2)
l = list of hex bytes (size = no. of bytes)
o = OSType (4 bytes, unterminated)
r = RGBColor: 3 unsigned short ints (size = 3)
s = character string (size = max. length.)
u = unsigned short (size = 2)
x = unsigned char (size = 1), hex */
unsigned char size;
void *valptr;
unsigned char *description;
short (*procptr)(void *resptr); /* validation procedure */
} keyinfo;
/* settings, except for variable-length strings */
typedef struct {
unsigned char attrmap[7]; /* attribute mappings */
char dblevel; /* debug level */
char setsflg; /* connection mode */
unsigned char timeout; /* seconds between retransmits */
unsigned char retries; /* number of retries */
char insreset; /* attn resets insert mode */
char impnull; /* improved null processing */
char digitpfk; /* Cmd Shift <digit> is PF */
short mousepf; /* double-click function */
char basecolor; /* base color mode */
char exactcolor; /* exact colors wanted */
/* current color settings */
RGBColor usrwhite;
RGBColor usryellow;
RGBColor usrpink;
RGBColor usrturquoise;
RGBColor usrgreen;
RGBColor usrred;
RGBColor usrblue;
RGBColor usrblack;
RGBColor usrback;
RGBColor usrstat;
short dfltptsize; /* default screen point size */
short altptsize; /* alternate screen point size */
short altrows; /* rows for alternate screen */
short altcols; /* columns for alternate screen */
short custrows; /* custom row size */
short custcols; /* custom column count */
short windpth; /* window center point- horiz. pos. */
short windptv; /* window center point- vert. pos. */
char invertbw; /* swap black and white */
char stat_time; /* status line time display */
char curpos; /* display cursor position */
char blockcurs; /* block cursor */
char ext3270; /* extended data stream support */
char std_brack; /* treat [ and ] normally */
char windmax; /* always use maximum window size */
char repnull; /* change embedded blanks to nulls */
char savewpos; /* save window position in file */
char autoconn; /* connect to host when settings loaded */
OSType text_creator; /* creator for text files */
char simps; /* simulate programmed symbol support */
char keepwindow; /* window persists after close */
char nographics; /* don't allocate graphics bitmap */
char nocolor; /* bitmaps only 1 bit deep */
/* even length should be maintained */
} settings_list;
struct mbhdr { /* MacBinary header */
unsigned char ver; /* version byte */
unsigned char fnlen; /* length of filename */
unsigned char fn[63]; /* filename */
unsigned char ftyp[4]; /* file type */
unsigned char fcreat[4]; /* file creator */
unsigned char flags; /* finder flags */
unsigned char flags2; /* second flag byte */
unsigned char vpos[2]; /* vertical position */
unsigned char hpos[2]; /* horizontal position */
unsigned char id[2]; /* window or folder ID */
unsigned char pflag; /* "protected" flag */
unsigned char zero2; /* zero */
unsigned char dataln[4]; /* data fork length */
unsigned char rscln[4]; /* resource fork length */
unsigned char crdate[4]; /* creation date */
unsigned char mddate[4]; /* last modified date */
unsigned char zero3[29]; /* zero fill */
};
typedef struct vmprt { /* values to control WMAC PRINT output */
/* default: definition: */
unsigned short fontnum; /* 22 font number */
/* monaco = 4; courier = 22 */
unsigned short pointsize; /* 11 font point size */
unsigned short leading; /* 12 line spacing, inches*72 */
unsigned short linewidth; /* 132 maximum characters per line; */
/* *cannot exceed 132* */
unsigned short tabsize; /* 4 tab spacing */
unsigned short pagelength; /* 57 maximum lines/page (no cc) */
unsigned short pagelencc; /* 59 maximum lines/page (with cc) */
unsigned short top; /* 14 top margin, inches*72 */
unsigned short headmarg; /* 2 lines between header & text (no cc) */
unsigned short left; /* 12 left margin, inches*72 (no cc) */
unsigned short leftcc; /* 0 left margin, inches*72 (with cc) */
unsigned short titlewidth; /* 74 width of title line in characters */
/* *cannot exceed 132* */
unsigned short unused1; /* 0 space for future additions */
unsigned short unused2; /* 0 */
unsigned short unused3; /* 0 */
unsigned short unused4; /* 0 */
} vmprt; /* this structure is stored in the VMPR 128 resource */
#define MAXLINEWIDTH 132 /* maximum allowed for line width */
/* point positions for selected text
3---------------------4
| |
1------2 |
| |
| |
| 6-------------5
| |
8--------------7
*/
typedef struct { /* coordinates defining selected text */
short x1;
short y1;
short x2;
short y2;
short x3;
short y3;
short x4;
short y4;
short x5;
short y5;
short x6;
short y6;
short x7;
short y7;
short x8;
short y8;
} selcoord;
typedef struct { /* data for each connection */
unsigned char readbuff[4624]; /* data transmitted to host */
/* size based on vmxfer maximum response:
6 byte prefix
2 bytes: DB
4608 bytes: 2304 bytes of data with IAC quoting
5 bytes: CRC suffix
2 bytes: IAC, EOR
1 byte padding
==> 4624 bytes */
short rbsize; /* current number of bytes in readbuff */
short rballoc; /* allocated size of readbuff */
WindowRecord wRecord;
GrafPort *myWindow;
GrafPort WritePort;
GrafPtr WritePtr;
unsigned char * mapptr;
GrafPort PictPort;
GrafPtr PictPtr;
unsigned char * pmapptr;
unsigned char wsfbuff[8192]; /* buffer for accumulating wsf data */
unsigned char *nlbuff; /* buffer for language translation */
/* size = screen width */
DialogRecord dlgrec; /* for file transfer dialog */
Cursor **grafcursor;
short ldvoff;
unsigned char * chrbuff;
unsigned short * atrbuff;
short curadr;
short bufadr;
short chratr;
short WriteCurr;
Rect er;
short x;
short y;
Rect inrect;
short in_len;
short in_off, in_atr;
short hpixsize;
short vpixsize;
short scrvoff;
short scrhsize;
short scrhoff;
short htxtstrt;
short vtxtstrt;
short vtxtsize;
short htxtsize;
short curvsize;
short curhsize;
short curnum;
short x_origin;
short y_origin;
short maxcnt;
short maxoff;
long textsize; /* size in bytes for stginfo */
long pictsize;
kbdata kbqueue[KBQMAX]; /* keyboard input queue */
short kbqsize;
short savedoffset; /* saved info. for getattr */
short savedattr;
writeinfo writesave[WRITEINFOCOUNT]; /* write debugging data */
struct machinfo * mp; /* info for machine we connect to (NCSA) */
int myport; /* tcp port to close from netopen */
short sessrefnum; /* session SPPC refnum */
unsigned char sppcname[16]; /* SPPC session name (for info only) */
short sesspref; /* port refnum for session */
unsigned char ppcname[32]; /* PPC session name (for info only) */
short apiopenrefnum; /* SPPC client refnum for open */
unsigned long apiopensref; /* PPC session refnum for open */
unsigned long apiopenmsgid; /* SPPC/PPC message id of open request */
short apicloserefnum; /* SPPC client refnum for notify */
unsigned long apiclosesref; /* PPC session refnum for close */
unsigned long apiclosemsgid; /* SPPC/PPC message id of notify request */
short apiwriterefnum; /* SPPC client refnum for notify */
unsigned long apiwritesref; /* PPC session refnum for write */
unsigned long apiwritemsgid; /* SPPC/PPC message id of notify request */
/* current settings */
unsigned char cshostname[256];
unsigned char cswtitle[256]; /* title for our window */
unsigned char cskybdname[256];
unsigned char csnlname[256]; /* initialized at startup from first menu item */
unsigned char cssndname[256]; /* initialized at startup from dfltsoundname */
settings_list cs;
/* settings to/from file */
unsigned char fshostname[256];
unsigned char fswtitle[256];
unsigned char fskybdname[256];
unsigned char fsnlname[256];
unsigned char fssndname[256];
settings_list fs;
unsigned char s_fName[64]; /* last filename used */
unsigned char connhostname[256]; /* host name for actual connection */
/* cshostname or prompt response */
unsigned char hostonly[256]; /* just hostname from connhostname */
unsigned char sessname[250]; /* name which describes this session */
short sessnameseq; /* sequence number for name */
short ioerror; /* terminal I/O error code */
short cur_rows; /* row count for current display */
short cur_cols; /* column count for current display */
short cur_ptsize; /* point size for current display */
unsigned char **kb_handle; /* handle to current keyboard mapping */
unsigned char **nl_handle; /* handle to current language mapping */
unsigned char nltab[256]; /* national language translation table */
unsigned char xtradata[64]; /* variables for data stream processing */
short wsfleft;
short xtralen;
short xtrainit;
short stdfont; /* no. of standard font (add 2 for bold) */
Handle sndhandle; /* handle to 'snd ' resource for beep */
RgnHandle cliprgn; /* regions for grow icon handling */
RgnHandle destrgn;
Rect pRect;
Rect sizeRect;
Rect statRect;
Rect textRect;
Rect scrnRect;
Rect pictRect;
Rect cposRect; /* rectangle for cursor postion numbers */
Rect gr_rect; /* grow icon rectangle */
DialogPtr xdlgptr;
char hisopts[256];
char myopts[256];
unsigned char subbuffer[100];
unsigned char *subpointer;
unsigned char *subend;
unsigned char replybuff[100];
unsigned char *replyptr;
PaletteHandle myPalette;
short pxsize;
short telrcv_state; /* FSA state */
short askedSGA; /* we have talked about SGA */
unsigned long last_t;
unsigned char statresult[24];
RGBColor rgbbk; /* save for restore call */
short init_loc;
short sel_loc;
short msgoffset;
unsigned char *linetext;
unsigned short *lineattr;
short linelen;
unsigned char *proctext;
unsigned short *procattr;
unsigned char *prochost;
selcoord lastsel;
short attrloc; /* location where last attribute was stored */
unsigned char *pastebuff;
short pastebuffsize;
/* vmxfer variables */
DateTimeRec wdate;
unsigned char statbuf[80];
unsigned char * rbuf; /* received data */
unsigned char * sbuf; /* data sent as reply */
short rlen; /* size of rbuf */
short slen; /* size of sbuf */
short xfspeed; /* file transfer character rate */
short rfd, wfd; /* read & write file descriptors */
short wfd_r; /* MacBinary resource fork descriptor */
short vnum; /* volume descriptor for RMAC/WMAC */
unsigned char macFName[258]; /* complete Mac file name */
unsigned char macVName[29]; /* Mac volume name */
/* both have length byte followed by
C string */
unsigned int cursiz; /* number of sectors transferred */
unsigned int filsiz; /* total number of sectors */
unsigned char statname[14]; /* "uploading" or "downloading" */
unsigned char prtbuf2[120]; /* message buffers */
unsigned char prtbuf3[120];
unsigned char prtbuf4[120];
struct mbhdr mh; /* MacBinary header */
long mbdbmax; /* MacBin data size in blocks */
long mbrbmax; /* MacBin resource size in blocks */
long mbdsize; /* MacBin data fork length */
long mbrsize; /* MacBin resource fork size */
long mbdextra; /* MacBin data fork padding */
long mbrextra; /* MacBin resource fork padding */
TPPrPort prtport;
short myFirst;
short myLast;
unsigned char rtnvol[28];
short prtlen;
short prtlen1;
short prtlen2;
int lineoffset;
int tt1len;
int pgnum;
unsigned char tt1[MAXLINEWIDTH+1];
unsigned char tt2[MAXLINEWIDTH+1];
unsigned char newline1[MAXLINEWIDTH+2]; /* extra space for cc and null */
unsigned char newline2[MAXLINEWIDTH+2];
/* end of vmxfer variables */
/* start of graphics variables */
short pleft; /* byte counts for segment processing */
short cleft;
Pattern dfltpat; /* default area pattern */
short copymode ; /* current mode for CopyBits */
unsigned char pictbuff[257];
unsigned char ctlbuff[257];
unsigned char pict_fName[64]; /* name of open PICT file (pascal) */
short pictvref; /* volume reference for open PICT file */
short pictfref; /* file reference for open PICT file */
PicHandle picthandle; /* handle for saved picture */
long pictcount; /* size of picture */
OSErr picterr; /* error (if any) during writing */
CQDProcs myProcs; /* proc pointers for changing */
Handle theWidth; /* Handle for SetLineWidth */
short xmin; /* variables to define rectangle */
short xmax;
short ymin;
short ymax;
short ptemp1;
short pboff;
short pcount;
short xpos;
short ypos;
Pattern fillpat; /* current area pattern */
PolyHandle mypoly;
unsigned char markstr[2]; /* one-byte Pascal string */
BitMap image_srcBits;
Rect image_srcRect;
Rect image_dstRect;
short image_rowcount;
short ctemp1;
short cboff;
short ccount;
/* end of graphics variables */
char quitflg;
char data_init; /* flag for start of new write */
char sent3270tt; /* flag for sent 3270 type */
char hadascii; /* flag for have had ascii data */
char newserver; /* Telnet server supports new protocol */
char skiplf;
char escmode;
char fsinv; /* 3270 pending invldscr */
char drawpict;
char newpict;
char kblock;
char kblcode;
char aplmode;
char insmode;
char online;
char ptfill;
unsigned char lastwcc;
char fmtscrn;
unsigned char rdaid;
char cur_mode; /* current display mode: 0 = normal, 1 = alt. */
char addr14; /* generate 14-bit addresses for this session */
char serflg; /* true = async */
char tcpflg; /* true = TCP/IP */
char apiopen; /* true if current session opened by API */
char apiopenpend; /* api open response not sent yet */
char apiopenkind; /* 0 = PPC, 1 = SPPC */
char apiclosenotify; /* true if close notification wanted */
char apiclosekind; /* 0 = PPC, 1 = SPPC */
char apiwritenotify; /* true if write notification wanted */
char apiwritekind; /* 0 = PPC, 1 = SPPC */
unsigned char apikberr; /* error code for API input processing */
char apinoalert; /* api wants alerts suppressed */
char apihide; /* api wants window hidden */
char logon; /* user logged-in to server */
char ewamode; /* logical erase/write state: 0 = default, 1 = alt. */
char pndbeep; /* pending bell */
char pndclr; /* pending clrpict */
char needwrite; /* call to writescr needed */
char kb_err; /* kb entry error code */
char wr_active; /* statline write active flag */
char zoomok; /* true if window can be zoomed */
char fixbracket; /* don't use GE with [, ] */
char savepict; /* save graphics in PICT file */
char textsel; /* text selected for cut/copy/clear */
char textmap; /* flag for presence of text bitmap */
char plainala; /* if true, suppress ALA overstrikes */
char wposok; /* true if saved window position is valid */
char sess_sppc; /* true if session registered ok */
char sessppc; /* true if session opened a port */
char connstate; /* connection state */
char skipnewmode; /* skip call to newmode for EW/EWA */
char statcpos; /* only draw curor position in status line */
char pendalign; /* alignbitmap call pending */
char serverconn; /* connecting to non-terminal server*/
char servermode; /* server connection active */
char serverflags; /* flags bits for special server processing */
char showfkey; /* controls enabling of fkey menu */
char wsfflag; /* variables for data stream state */
unsigned char * wsfptr;
unsigned char wsfop;
unsigned char lstopcd;
char needtoend;
char msg1flg;
char inschar;
char hostok;
char framedfield; /* screen contains framed fields */
unsigned char last_stat_time;
char showsel;
char colorfield;
char cutflag;
char respflag;
char savedvalid; /* for getattr's saved info. */
char pastebeep; /* beep needed after paste finishes */
char pasteactive; /* using paste queue instead of keyboard queue */
char fsoldformat; /* "fs" settings are for old file format */
/* vmxfer char variables */
char ropen; /* flags indicating file open for rd/wr */
char wopen;
char vmxbgn; /* xfer mode active flag */
char vmxsub; /* xfer subset mode active flag */
char kabort; /* "keyboard" abort flag */
char xdlg; /* xfer dialog opened */
char binxf; /* binary mode file transfer */
char mbinxf; /* MacBinary file transfer */
char prtxf; /* downloading print file */
char prtcc; /* print file has carriage control */
char prpgopen; /* print page open */
char prfileinit; /* print file initializtion done */
char prdocopen; /* print document open */
char cmpstate; /* state for compression */
unsigned char prevchar; /* previous character for compression */
char crcok; /* true if crc has been appended */
char xlflag; /* true if XL command has been recieved */
char nomenu; /* "nomenu" option specified */
char nextcc;
/* end of vmxfer char variables */
/* start of graphics char variables */
struct {
unsigned char wsf_op;
unsigned char wsf_gr;
unsigned char grf_op;
} wsfdbg;
unsigned char dfltcolor; /* default color = green */
unsigned char dfltlw; /* default line width = 1 pixel */
unsigned char dfltlt; /* default line type = solid */
unsigned char dfltmarker; /* default marker = diamond */
unsigned char dfltmix; /* default mix mode */
unsigned char linew; /* current line width */
unsigned char linet; /* current line type */
char pictopen; /* true when PICT file is open */
char area_active; /* flag to indicate area is active */
char image_active; /* flag to indicate image data is active */
char pmode;
unsigned char markchar; /* current marker */
unsigned char aflags;
char cmode;
char openflg;
/* end of graphics char variables */
} cnr;
typedef struct WorldTable {
unsigned char * WTPCBPtr;
short WTFlags;
ProcPtr WTBgtask;
Handle WTScrbits;
WindowPtr WTDeskAcc;
} WorldTable;
#define DFLTWHITE {0xffff, 0xffff, 0xffff}
#define DFLTYELLOW {0xfc00, 0xf37d, 0x052f}
#define DFLTRED {0xdd6b, 0x08c2, 0x06a2} /* in 16-color ctab */
#define CTDFLTPINK {0xf2d7, 0x0856, 0x84ec} /* in 16-color ctab */
#define DFLTPINK {0xffff, 0x7a5d, 0x9f8e}
#define CTDFLTBLUE {0x0000, 0x0000, 0xd400} /* in 16-color ctab */
#define DFLTBLUE {0x4eba, 0x6aea, 0xdd6b}
#define CTDFLTTURQUOISE {0x0241, 0xab54, 0xeaff} /* in 16-color ctab */
#define DFLTTURQUOISE {0x0000, 0xc42f, 0xeaff}
#define DFLTGREEN {0x25ea, 0xdf93, 0x1897}
#define DFLTBLACK {0x0000, 0x0000, 0x0000}
#define DFLTBACK {0xf00, 0xf00, 0xf00}
#define CTDFLTBACK {0x4000, 0x4000, 0x4000} /* in 16-color ctab */
#define DFLTSTAT {0x8600, 0x8600, 0x8600}
/* palette indices for colors */
#define RGBblack 1
#define RGBwhite 2
#define RGBback 3
#define RGBgreen 4
#define RGBred 5
#define RGBblue 6
#define RGBpink 7
#define RGByellow 8
#define RGBturquoise 9
#define RGBstat 10
typedef struct scrapline { /* definition of private scrap line element */
struct scrapline *nextline;
unsigned char *text;
unsigned short *attr;
} scrapline;
typedef struct hexmap {
unsigned short offset;
unsigned char stdchar;
unsigned char aplchar;
} hexmap;
typedef struct uareply { /* Usable Area Query Reply */
unsigned short length; /* structured field total length (46) */
unsigned char sfid; /* structured field id (X'81') */
unsigned char qcode; /* usable area id (X'81') */
unsigned char flags1; /* first flag byte (X'03') */
unsigned char flags2; /* second flag byte (X'00') */
unsigned short w; /* width of usable area (computed) */
unsigned short h; /* height of usable area (computed) */
unsigned char units; /* units of measure (X'00' = inches) */
unsigned char xr[4]; /* x point spacing (X'00010048' = 1/72) */
unsigned char yr[4]; /* y point spacing (X'00010048' = 1/72) */
unsigned char aw; /* width of default cell (computed) */
unsigned char ah; /* height of default cell (computed) */
unsigned char buffsz[2]; /* character buffer size (X'0000') */
unsigned char xmin; /* minimum x units in cell (X'00') */
unsigned char ymin; /* minimum y units in cell (X'00') */
unsigned char xmax; /* maximum x units in cell (X'00') */
unsigned char ymax; /* maximum y units in cell (X'00') */
unsigned char aualen; /* length for alternate usable area (X'13') */
unsigned char auapid; /* parameter id for alt. usable area (X'02') */
unsigned char auares; /* reserved (X'00') */
unsigned char auaid; /* id for alt. usable area partition (X'01') */
unsigned char waua[2]; /* width of alt. usable area (computed) */
unsigned char haua[2]; /* height of alt. usable area (computed) */
unsigned char auaunits; /* units of measure (X'00' = inches) */
unsigned char auaxr[4]; /* x point spacing (X'00010048' = 1/72) */
unsigned char auayr[4]; /* y point spacing (X'00010048' = 1/72) */
unsigned char awaua; /* width of default cell (computed) */
unsigned char ahaua; /* height of default cell (computed) */
} uareply;
typedef struct ipreply { /* Implicit Partition Query Reply */
unsigned short length; /* structured field total length (28) */
unsigned char sfid; /* structured field id (X'81') */
unsigned char qcode; /* implicit partition id (X'A6') */
unsigned char flags[2]; /* flags - reserved (X'0000') */
unsigned char scrnlen; /* length of screen parameters (X'0B') */
unsigned char scrnpid; /* screen parameter id (X'01') */
unsigned char scrnflags; /* screen flags - reserved (X'00') */
unsigned char wd[2]; /* default width in chars (computed) */
unsigned char hd[2]; /* default height in chars (computed) */
unsigned char wa[2]; /* alternate width in chars (computed) */
unsigned char ha[2]; /* alternate height in chars (computed) */
unsigned char celllen; /* length of cell sizes (X'0B') */
unsigned char cellpid; /* cell size parameter id (X'02') */
unsigned char cellflags; /* cell size flags - reserved (X'00') */
unsigned char wcd[2]; /* default cell width (computed) */
unsigned char hcd[2]; /* default cell height (computed) */
unsigned char wca[2]; /* alternate cell width (computed) */
unsigned char hca[2]; /* alternate cell height (computed) */
} ipreply;
#define NMRNUM 2 /* number of notification manager messages */
typedef struct { /* Notification Manager record and message */
NMRec qelem;
unsigned char msg[256];
} nmrmessage;
typedef struct {
unsigned char *next; /* actually qctl* */
char inuse;
char pend_inuse;
} qctl;
typedef struct { /* PPC queue descriptor */
unsigned char name[8]; /* name of queue (for messages) */
qctl *first; /* pointer to first element */
Size elemsize; /* size of one queue element */
short minavail; /* allocate to keep this many available */
char stgerr; /* allocation failed */
char spare;
} queueinfo;
typedef struct {
long sessrefnum;
long userdata;
cnr *cp; /* 0 for session manager */
char servicetype;
char reqtype;
} clientinfo;
typedef struct {
long length;
long userdata;
long creator;
long type;
long sessrefnum;
char more;
char incoming; /* true if data from PPCRead */
unsigned char msg[128];
} datainfo;
typedef struct {
qctl header;
PPCParamBlockRec pb;
} paramrec;
typedef struct {
qctl header;
clientinfo client;
} clientrec;
typedef struct {
qctl header;
datainfo data;
} datarec;